<!DOCTYPE html>
<html>
<head>
    

    

    



    <meta charset="utf-8">
    
    
    
    <title>Cucy的博客</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="">
    <meta property="og:type" content="website">
<meta property="og:title" content="Cucy的博客">
<meta property="og:url" content="http://zhourudong.cn/index.html">
<meta property="og:site_name" content="Cucy的博客">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Cucy的博客">
    
        <link rel="alternate" type="application/atom+xml" title="Cucy的博客" href="/atom.xml">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="/css/style.css?v=1.6.13">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu"  >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.png">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">cucy</h5>
          <a href="mailto:292016176@qq.com" title="292016176@qq.com" class="mail">292016176@qq.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect active">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                Archives
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                Tags
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/cucy" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">Cucy的博客</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header index-header">

    <div class="container fade-scale">
        <h1 class="title">Cucy的博客</h1>
        <h5 class="subtitle">
            
                
            
        </h5>
    </div>

    


</header>

<div class="container body-wrap">

    <ul class="post-list">
    
        <li class="post-list-item fade">
            <article id="post-51-mongodb副本集搭建"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017-10-19 13:58:45" datetime="2017-10-19T05:58:45.000Z"  itemprop="datePublished">2017-10-19</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/10/19/51-mongodb副本集搭建/">mongodb副本集搭建</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        [TOC]
mongodb副本集搭建软件版本os:# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) 3.4.xcat /etc/yum.repos.d/mongodb.repo[mongodb-org]name=MongoDB Repositorybaseurl=https://mirrors.tuna.tsingh...
    

        <a href="/2017/10/19/51-mongodb副本集搭建/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/mongodb/">mongodb</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-50-mysql之连接and参数and用户权限篇"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017-09-16 16:13:35" datetime="2017-09-16T08:13:35.000Z"  itemprop="datePublished">2017-09-16</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/16/50-mysql之连接and参数and用户权限篇/">mysql之连接and参数and用户角色权限篇</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        [TOC]
连接主要登录方式方式一默认是当前登录的系统用户 $USER@localhost[root@mysqlenv_test ~]#mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
方式二 使用socket连接LINUX 系统才有socket连接mysql -S ...
    

        <a href="/2017/09/16/50-mysql之连接and参数and用户权限篇/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/mysql/">mysql</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-49-mysql之安装升级篇"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017-09-16 14:59:21" datetime="2017-09-16T06:59:21.000Z"  itemprop="datePublished">2017-09-16</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/16/49-mysql之安装升级篇/">mysql之安装升级篇</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        [TOC]
mysql 国内镜像http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/https://dev.mysql.com/downloads/mysql/5.6.html#downloads# 下载完成后进行MD5校验和mysql官网进行对比,检查软件包是否被修改$ md5sum mysql-5.6.37-linux-glibc2.12-x86...
    

        <a href="/2017/09/16/49-mysql之安装升级篇/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/mysql/">mysql</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-48-django架构"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017-09-13 17:31:19" datetime="2017-09-13T09:31:19.000Z"  itemprop="datePublished">2017-09-13</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/13/48-django架构/">django架构</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        项目结构:gazette/    __init__.py    models.py    views.py    static/        ...    templates/        gazette/            __base.html            __l_single_col.html            __l_right_sidebar.html    ...
    

        <a href="/2017/09/13/48-django架构/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/django/">django</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-47-django官方文档快捷链接"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017-09-13 17:18:51" datetime="2017-09-13T09:18:51.000Z"  itemprop="datePublished">2017-09-13</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/13/47-django官方文档快捷链接/">django官方文档快捷链接</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        官方快捷链接
django http
Django如何处理一个http请求404，403，500错误Including other URLconfs语法Reverse resolution of URLs 反向解析URL namespaces命名空间A simple viewReturning errors返回错误Customizing error views自定义错误页面View deco...
    

        <a href="/2017/09/13/47-django官方文档快捷链接/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/django/">django</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-46-django-用户模型翻译"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017-09-08 15:06:35" datetime="2017-09-08T07:06:35.000Z"  itemprop="datePublished">2017-09-08</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/08/46-django-用户模型翻译/">django 用户模型翻译</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        django用户认证django默认提供用户认证系统，它提供用户账号，组，权限，cookie，用户session等功能，此文档解释了django如何实现这些功能,此外也介绍如何在项目中自定义用户认证系统 extend and customize 
概述django处理用户验证和授权.简而言之，身份验证如何证明我是我，授权是用户有什么权限。
认证系统包括：

用户
权限: (yes/no)标志...
    

        <a href="/2017/09/08/46-django-用户模型翻译/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/django/">django</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-45-gitlab维护"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017-08-24 17:46:30" datetime="2017-08-24T09:46:30.000Z"  itemprop="datePublished">2017-08-24</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/08/24/45-gitlab维护/">gitlab维护</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        缺省安装后的一些重要信息
程序目录在：/opt/gitlab
文件数据在：/var/opt/gitlab
git repo目录在：/var/opt/gitlab/git-data
上传图片目录在：/var/opt/gitlab/uploads
大文件、二进制文件目录在: /var/opt/gitlab/gitlab-rails/shared/lfs-objects
备份文件目录在: /var...
    

        <a href="/2017/08/24/45-gitlab维护/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/gitlab/">gitlab</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-44-GitLab7-9-2升级到9-4-5最新版本"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017-08-24 17:17:02" datetime="2017-08-24T09:17:02.000Z"  itemprop="datePublished">2017-08-24</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/08/24/44-GitLab7-9-2升级到9-4-5最新版本/">GitLab7.9.2升级到9.4.5最新版本</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        升级前准备
HOSTS
vim /etc/hosts192.168.1.45 dev-office-dev-192.168.1.45.centos65.sanhao.com 192.168.1.45 gitlab.sh.com

在1.45创建数据库
CREATE DATABASE `gitlab`GRANT ALL ON gitlab.* TO gitlab@&apos;%&apos;  ...
    

        <a href="/2017/08/24/44-GitLab7-9-2升级到9-4-5最新版本/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/gitlab/">gitlab</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-38-django-orm"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017-05-31 17:32:22" datetime="2017-05-31T09:32:22.000Z"  itemprop="datePublished">2017-05-31</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/05/31/38-django-orm/">django orm</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        模型from django.db import modelsclass UserType(models.Model):    # 用户类型    caption = models.CharField(max_length=16)class UserInfo(models.Model):    # 用户信息    username = models.CharField(max_length=32)    pwd = models.CharField(max_length=32)    user_type = models.ForeignKey(&apos;UserType&apos;)
    

        <a href="/2017/05/31/38-django-orm/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/django-orm/">django orm</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-37-python-字典"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017-04-20 09:50:33" datetime="2017-04-20T01:50:33.000Z"  itemprop="datePublished">2017-04-20</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/04/20/37-python-字典/">python 字典</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        按字典值大小进行排序# How to sort a Python dict by value# (== get a representation sorted by value)&gt;&gt;&gt; xs = &#123;'a': 4, 'b': 3, 'c': 2, 'd': 1&#125;&gt;&gt;&gt; sorted(xs.items(), key=lambda x: x[...
    

        <a href="/2017/04/20/37-python-字典/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/python/">python</a></li></ul>

    </div>
    
</article>

        </li>
    
    </ul>

    
<nav id="page-nav">
    <div class="inner">
    <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><span class="space">&hellip;</span><a class="page-number" href="/page/6/">6</a><a class="extend next" rel="next" href="/page/2/">下一页</a>
    </div>
</nav>


</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>cucy &copy; 2016 - 2017</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://zhourudong.cn/&title=Cucy的博客&pic=http://zhourudong.cn/img/avatar.png" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://zhourudong.cn/&title=Cucy的博客&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://zhourudong.cn/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=Cucy的博客&url=http://zhourudong.cn/&via=http://zhourudong.cn" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://zhourudong.cn/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://zhourudong.cn/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };


</script>

<script src="/js/main.min.js?v=1.6.13"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="/js/search.min.js?v=1.6.13" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>



<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '死鬼去哪里了！';
            clearTimeout(titleTime);
        } else {
            document.title = '(つェ⊂)咦!又好了!';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
